package cn.zkcloud;

import org.apache.log4j.Logger;

import javax.servlet.*;
import javax.servlet.http.HttpSessionListener;

/**
 * @Author zk
 * @Date 2017/6/19.
 * @Email zkdcloud_cn@163.com
 */
public abstract class AbstractServletListener implements ServletContextListener,ServletRequestListener,HttpSessionListener{
    private static Logger logger = Logger.getLogger(AbstractServletListener.class);

    private ServletContext servletContext;

    public void contextInitialized(ServletContextEvent sce) {
        logger.debug("servletContext init ...");
        this.servletContext = sce.getServletContext();
    }

    public void requestDestroyed(ServletRequestEvent sre) {

    }

    public void requestInitialized(ServletRequestEvent sre) {

    }

    public ServletContext getServletContext(){
        return this.servletContext;
    }
}
